﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HotelManagement.Class;

namespace HotelManagement.UserManagementModule
{
    public partial class UpdateSuccess : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            UserAccount us = (UserAccount)Session["object"];
            Staff stf=(Staff)Session["updated"]; //new data
            Staff detail=(Staff)Session["detail"]; //old data to be displayed
            Label3.Text = stf.FirstName + " " + stf.LastName; //heading
            Label4.Text = us.StaffID;
            Label5.Text = us.UserID;
            Label6.Text = us.Role;
            Label12.Text = stf.FirstName;
            Label13.Text = stf.LastName;
            Label9.Text = detail.Gender;
            Label10.Text = detail.DateOfBirth;
            Label14.Text = Convert.ToString(stf.MobileNum);
            Label15.Text = Convert.ToString(stf.HomeNum);
            Label16.Text = stf.EmailAddress;
            Label21.Text = stf.BlockNum;
            Label18.Text = stf.UnitNum;
            Label19.Text = stf.StreetName;
            Label11.Text = detail.Country;
            Label20.Text = stf.PostalCode;
            us.FirstName = stf.FirstName; //override firstname
            us.LastName = stf.LastName; //override lastname
            Session["object"] = us; //override with new data
        }

        protected void Button1_Click(object sender, EventArgs e)
        {

        }
    }
}